Crowding genetic algorithm can obtain multiple optima of multimodal functions, but it has low efficiency, and cannot get a higher precision in limited iterations. In order to obtain all optima of the multimodal function quickly, the crowding genetic algorithm based on logarithmic adaption was presented combined with niche crowding genetic and climbing operators. The algorithm computed the distance values of climbing operators by logarithmic adaption according to the iterations, which made the population maintain genetic diversity in the process. According to the experiments and comparative analysis of several one-dimensional and two-dimensional multimodal functions, the test results show that the algorithm can ensure both the solution accuracy rate and the convergence speed in the limited iterations, and obtain all optimal solutions more stably. It is proved to be an effective algorithm for the multimodal function problems.
In visual detection of subminiature accessory, the extracted target contour will be affected by the existence of foreign matter in the field like dust and hair crumbs. In order to avoid the impact for measurement brought by foreign matter, a method of culling foreign matter fake information based on prior knowledge was put forward. Firstly, the corners of component image with foreign matter were detected. Secondly, the corner-distribution features of standard component were obtained by statistics. Finally, the judgment condition of foreign matter fake imformation was derived from the corner-distribution features of standard component to cull the foreign matter fake information. Through successful application in an actual engineering project, the processing experiments on three typical images with foreign matter prove that the proposed algorithm ensures the accuracy of the measurement, while effectively culling the foreign matter fake information in the images.